#include "CurrentThread.h"

namespace CurrentThread {
    __thread int cacheTid_ = 0;
    // 缓存的 cacheTid_ 值, 因为前面是声明在Thread的extern变量, 要获取到cacheTid_只能再声明一IC
    __thread char t_tidString[32];
    __thread int t_tidStringLength = 6;
    __thread const char *t_threadName = "unknown";
    // 缓存一个线程的名称
    static_assert(std::is_same<int, pid_t>::value, "pid_t should be int");

}  // namespace CurrentThread